
#ifndef		__WEAPON_H
#define		__WEAPON_H

#include	<deque>
#include	<vector>

#include	"Projectile.h"

class Ship;

class Weapon {

	private:
		std::deque<Projectile>	projectiles;
		SDL_Surface*			projectilesSurface;
		Projectile				p;
		Ship*					pShip;
		int						firingInterval;
		int						weaponFireRate;
		bool					enemyWeapon;

	public:
		Weapon();

		enum weaponTypes {
			PULSE_GUN
		} weaponType;

		enum weaponFireRates {
			PULSE_GUN_RATE = 160
		};

		bool isFiring;

		bool init(weaponTypes w, Ship*);

		void fire();

		void loopProjectiles();

		void renderProjectiles(SDL_Surface*);

		void cleanup();

		void setEnemyWeapon(bool);

		void setFireRate(int);

};

#endif
